// @ts-ignore
/* eslint-disable */
import request from "@/plugins/globalRequest";

/** 新增果蔬种类 POST /vegVariety/addVegVariety */
export async function addVegVarietyUsingPOST(
  body: API.VegetableVariety,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultString_>('/vegVariety/addVegVariety', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据id删除果蔬种类 DELETE /vegVariety/deleteVegetableVarietyById/${param0} */
export async function deleteVegetableVarietyByIdUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteVegetableVarietyByIdUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResultString_>(`/vegVariety/deleteVegetableVarietyById/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 批量删除果蔬种类 DELETE /vegVariety/deleteVegVarietyList */
export async function deleteVegVarietyListUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteVegVarietyListUsingDELETEParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultVegetableVariety_>('/vegVariety/deleteVegVarietyList', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改果蔬种类 PUT /vegVariety/modifyVegVarietyById */
export async function modifyVegVarietyByIdUsingPUT(
  body: API.VegetableVariety,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultVegetableVariety_>('/vegVariety/modifyVegVarietyById', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页查询所有果蔬种类 GET /vegVariety/queryAllVegVar */
export async function queryAllUsingGET4(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryAllUsingGET4Params,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultPageQueryCondition_>('/vegVariety/queryAllVegVar', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 根据id查询果蔬种类 GET /vegVariety/queryVegVarietyById/${param0} */
export async function queryVegVarietyByIdUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryVegVarietyByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResultVegetableVariety_>(`/vegVariety/queryVegVarietyById/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
